# 先安装ktctl, 安装方法 https://github.com/alibaba/kt-connect
# 将本地网络与k8s网络打通
sudo ktctl -c ai-dx.yaml connect

# STEP 1：构建基础镜像
docker build -t kubeflow-dashboard:debug -f install/docker/Dockerfile-upgrade .
# STEP 2：启动服务
docker run -v $PWD:/home/myapp --network=host \
        kubeflow-dashboard:debug  bash -c "gunicorn --bind  0.0.0.0:8888  -k gevent  --workers 1  --timeout=1000 --worker-connections=1000 myapp.app:app"

# 更新数据库字段
docker run -v $PWD:/home/myapp --network=host   kubeflow-dashboard:debug  bash -c "myapp/bin/myapp db migrate"


# 本地启动celery
docker run -v $PWD:/home/myapp --network=host \
        kubeflow-dashboard:debug  bash -c "celery --app=myapp.tasks.celery_app:celery_app beat --loglevel=info"
